﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Baosight.ZNH.ZM.UI;
using Baosight.Platform.Core.UI.Controls;
using Baosight.Platform.Core;
using Baosight.ZNH.ZMCommon;
using Baosight.Platform.Core.ServiceModel;

namespace Baosight.ZNH.ZM.UI
{
    public partial class ProducePortal : EFViewCmes, Portal
    {
        public ProducePortal()
        {
            InitializeComponent();
            initGrid();
        }

        public void initGrid()
        {
            EIInfo eiInfo = new EIInfo();
            eiInfo.Set("service", "ZM90");
            eiInfo.Set("method", "query");
            HttpServiceAgent agent = new HttpServiceAgent();
            agent.CallService(eiInfo, DoQeuryEventStateCompleted);
        }

        private void DoQeuryEventStateCompleted(object sender, DoWorkCompletedEventArgs e)
        {
            EIInfo info = e.EIInfo;
            this.grid.UpdateData(info);
        }
    }
}
